package com.tuanzi.loan.security;

import com.tuanzi.loan.business.entity.CurrentUser;
import org.hibernate.envers.RevisionListener;

/**
 * @author Ray 2017/09/21
 */
public class LoanRevisionListener implements RevisionListener {

    public void newRevision(Object revisionEntity) {
        LoanRevision loanRevision = (LoanRevision) revisionEntity;
        loanRevision.setOperator(CurrentUser.get().getName());
    }
}
